<?php defined('YB_VERSION') or exit;?>
<nav id="navbar" class="navbar navbar-inverse">
	<div class="container">
		<div class="navbar-header">
			<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
				<span class="sr-only">Toggle navigation</span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
			</button>
			<h1>
				<a class="navbar-brand" href="__WEBROOT__">
					<CONFIG:@.SYSTEM_NAME>
					<!--<img alt="YurunBlog" src="这里支持放Logo图片">-->
				</a>
			</h1>
		</div>
		<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
			<ul class="nav navbar-nav">
				<li class="<if condition="'Index' === __DYNAMIC_CONTROL__ && 'index' === __DYNAMIC_ACTION__"> active</if>"><a href="__WEBROOT__">首页</a></li>
				<foreach list="$categorys">
					<li class="<if condition="
					('Article' === __DYNAMIC_CONTROL__ && 'list' === __DYNAMIC_ACTION__ && $categoryInfo['ID'] === $value['ID'])
					||
					('Article' === __DYNAMIC_CONTROL__ && 'view' === __DYNAMIC_ACTION__ && $articleInfo['CategoryID'] === $value['ID'])
					"> active</if><if condition="isset($value['Children'])"> dropdown</if>">
						<if condition="isset($value['Children'])">
							<a href="<%=$value['Url']%>" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><%=$value['Name']%> <span class="caret"></span></a>
							<ul class="dropdown-menu">
								<foreach list="$value['Children']" value="child">
								<li><a href="<%=$child['Url']%>"><%=$child['Name']%></a></li>
								</foreach>
							</ul>
						<else/>
							<a href="<%=$value['Url']%>"><%=$value['Name']%></a>
						</if>
					</li>
				</foreach>
			</ul>
			<ul class="nav navbar-nav navbar-right">
				<!--<li><a href="about.html">关于</a></li>-->
			</ul>
		</div>
	</div>
</nav>